/**
 *
 * @author ace
 * @create 2017/7/21
 */
class LogoScene extends BaseScene {

    private img_logo: eui.Image;

    constructor() {
        super();
        this.skinName = "LogoSceneSkin";
    }

    childrenCreated() {
        super.childrenCreated();

        this.img_logo.source = GameConfig.res_config['game_logo_startup'];

        this.img_logo.alpha = 0;
        egret.Tween.get(this.img_logo)
            .to({alpha: 1}, 500)
            .wait(1000)
            // .to({alpha: 0}, 300)
            .call(this.hide, this);
    }

    show() {
        super.show();

        this.width = acelab.stage.stageWidth;
        this.height = acelab.stage.stageHeight;

        acelab.stage.addChild(this);
    }

    hide() {
        super.hide();
        acelab.stage.removeChild(this);

        // let thiz = this;
        // egret.Tween.get(this)
        //     .to({alpha: 0}, 300)
        //     .call(function () {
        //         acelab.stage.removeChild(thiz);
        //     });
    }
}